

var myChart = echarts.init(document.getElementById("main"));
var myChart2 = echarts.init(document.getElementById("main2"));
var myChart3 = echarts.init(document.getElementById("main3"));
var arr = ['8.23', '8.24', '8.25', '8.26', '8.27', '8.28', '8.29', '8.23', '8.24', '8.25', '8.26', '8.27', '8.28', '8.29'];
option = {
  backgroundColor: "#fff",
  tooltip: {
    trigger: 'axis',
    
  },
  grid: {
    show: true,
    left: '1%',
    right: '1%',
    bottom: '4%',
    containLabel: true,
  },
  xAxis: [
    {
      type: 'category',
      boundaryGap: false,
      data: arr
    }
  ],
  yAxis: [
    {
      type: 'value'
    }
  ],
  color: ['#80d3ad'],
  series: [
    {
      name: '邮件营销',
      type: 'line',
      stack: '总量',
      smooth: true,
      lineStyle: {
        normal: {
          color: "#009e4b"
        }
      },
      areaStyle: {
        normal: {
          color: "#80d3ad"
        }
      },
      data: [120, 132, 101, 134, 90, 230, 210, 120, 132, 101, 134, 90, 230, 210],
    }
  ]
};
option2 = {
  backgroundColor: "#fff",
  tooltip: {
    trigger: 'axis',
    
  },
  grid: {
    show: true,
    left: '1%',
    right: '2%',
    bottom: '4%',
    containLabel: true,
  },
  xAxis: [
    {
      type: 'category',
      boundaryGap: false,
      data: arr
    }
  ],
  yAxis: [
    {
      type: 'value'
    }
  ],
  color: ['#2f6f95'],
  series: [
    {
      name: '邮件营销',
      type: 'line',
      stack: '总量',
      smooth: true,
      lineStyle: {
        normal: {
          color: "#2f6f95"
        }
      },
      areaStyle: {
        normal: {
          color: "#96cceb"
        }
      },
      data: [120, 132, 101, 134, 90, 230, 210, 120, 132, 101, 134, 90, 230, 210],
    }
  ]
};
option3 = {
  backgroundColor: "#fff",
  tooltip: {
    trigger: 'axis',
    
  },
  grid: {
    show: true,
    left: '1%',
    right: '2%',
    bottom: '4%',
    containLabel: true,
  },
  xAxis: [
    {
      type: 'category',
      boundaryGap: false,
      data: arr
    }
  ],
  yAxis: [
    {
      type: 'value'
    }
  ],
  color: ['#2f6f95'],
  series: [
    {
      name: '邮件营销',
      type: 'line',
      stack: '总量',
      smooth: true,
      lineStyle: {
        normal: {
          color: "#2f6f95"
        }
      },
      areaStyle: {
        normal: {
          color: "#96cceb"
        }
      },
      data: [120, 132, 101, 134, 90, 230, 210, 120, 132, 101, 134, 90, 230, 210],
    }
  ]
};

// 使用刚指定的配置项和数据显示图表。
myChart.setOption(option);
myChart2.setOption(option2);
myChart3.setOption(option3);

window.addEventListener("resize", function () {
  myChart.resize();
  myChart2.resize();
  myChart3.resize();
})
